﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Ribbon_Ribbon_MultiLineGroup : System.Web.UI.UserControl
{
    private System.Collections.Generic.List<Control> _TopItems;
    private System.Collections.Generic.List<Control> _MiddleItems;
    private System.Collections.Generic.List<Control> _BottomItems;

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public System.Collections.Generic.List<Control> TopContentTemplate
    {
        get { return _TopItems; }
        set { _TopItems = value; }
    }

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public System.Collections.Generic.List<Control> MiddleContentTemplate
    {
        get { return _MiddleItems; }
        set { _MiddleItems = value; }
    }

    [PersistenceMode(PersistenceMode.InnerProperty)]
    public System.Collections.Generic.List<Control> BottomContentTemplate
    {
        get { return _BottomItems; }
        set { _BottomItems = value; }
    }

    /// <summary>
    /// Text to show in the lower part of the group
    /// </summary>
    public string Text
    {
        get { return this.Literal1.Text; }
        set { this.Literal1.Text = value; this.tt_cell.Attributes["title"] = value; }
    }

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        if (_TopItems != null)
        {
            foreach (Control obj in _TopItems)
            {
                this.PlaceHolder_top.Controls.Add(obj);
            }
        }
        if (_MiddleItems != null)
        {
            foreach (Control obj in _MiddleItems)
            {
                this.PlaceHolder_middle.Controls.Add(obj);
            }
        }
        if (_BottomItems != null)
        {
            foreach (Control obj in _BottomItems)
            {
                this.PlaceHolder_bottom.Controls.Add(obj);
            }
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
